#!/usr/bin/env bash

export PATH="~/go/bin:${PATH}"

function err_exit {
    if [[ 0 -ne $? ]]; then exit 1; fi
}

mkdir -p ~/go/bin
git submodule update --init --recursive \
    && cd eth-beacon-genesis && go install ./cmd/eth-beacon-genesis && cd .. \
    && cd eth2-val-tools && go install . && cd ..

err_exit
